﻿using System;

namespace XiaoYuStock.Model
{
    /// <summary>
    /// 作者：Vincen
    /// 时间：2015.09.06
    /// 描述：枚举基类属性定义
    /// </summary>
    [AttributeUsage(AttributeTargets.Field, AllowMultiple = true)]
    public class BaseEnumAttribute : Attribute
    {
        /// <summary>
        /// 英文名称
        /// </summary>
        public string Ename { get; set; }
        /// <summary>
        /// 中文名称
        /// </summary>
        public string Cname { get; set; }
        /// <summary>
        /// 简写代号
        /// </summary>
        public string Scode { get; set; }
        /// <summary>
        /// 排列序号
        /// </summary>
        public int OrderNum { get; set; }



        /// <summary>
        ///  描述（说明）
        /// </summary>
        public string Description { get; set; }

        public BaseEnumAttribute()
        {
            this.Cname = string.Empty;
            this.Ename = string.Empty;
            this.Scode = string.Empty;
            this.Description = string.Empty;
            this.OrderNum = 0;
        }
        public BaseEnumAttribute(string cname)
        {
            this.Cname = cname;
            this.Ename = string.Empty;
            this.Scode = string.Empty;
            this.Description = string.Empty;
            this.OrderNum = 0;
        }
        public BaseEnumAttribute(string cname, string ename)
        {
            this.Cname = cname;
            this.Ename = ename;
            this.Scode = string.Empty;
            this.Description = string.Empty;
            this.OrderNum = 0;
        }
        public BaseEnumAttribute(string cname, string ename, string scode)
        {
            this.Cname = cname;
            this.Ename = ename;
            this.Scode = scode;
            this.Description = string.Empty;
            this.OrderNum = 0;
        }
        public BaseEnumAttribute(string cname, string ename, string scode, string description)
        {
            this.Cname = cname;
            this.Ename = ename;
            this.Scode = scode;
            this.Description = description;
            this.OrderNum = 0;
        }

        public BaseEnumAttribute(string cname, string ename, int sort)
        {
            this.Cname = cname;
            this.Ename = ename;
            this.Scode = string.Empty;
            this.Description = string.Empty;
            this.OrderNum = sort;
        }
    }
}
